<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<%
	String contextPath = request.getContextPath();
%>
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content=",initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<title>常用地址</title>
	<!-- inject:css -->
	<link rel="stylesheet" href="<%=contextPath %>/resources/css/main.css">
	<link rel="stylesheet" href="<%=contextPath %>/resources/css/main.ext.css">
	<!-- endinject -->
	<link rel="stylesheet" href="<%=contextPath %>/resources/css/lib/layer.css">

</head>

<body>
	<div class="main addressWrap">

		<ul class="addressBody">
			<c:forEach items="${memberAddresses }" var="memberAddress">
			<c:choose>
				<c:when test="${memberAddress.is_default>=1 }">
					<li class="itmes default">
				</c:when>
				<c:otherwise>
					<li class="itmes ">
					<span class="setdefault" onclick="setAddressDefault('${memberAddress.id}','${openid }')">设为默认</span>
				</c:otherwise>
			</c:choose>
				<ul class="addressInfo ">
					<li class="userInfo">
						<span class="userName">${memberAddress.name }</span>
						<span class="phone">${memberAddress.mobile }</span>
					</li>
					<li>
						${memberAddress.city }市${memberAddress.address }
					</li>

				</ul>
				<div class="addressFooter">
					<ul class="addressDo ">

						<li><a href="<%=contextPath %>/usercenter/editaddress?id=${memberAddress.id }&moduleType=2" class="edit">修改</a></li>
						<li class="js-del" onclick="delAddr('${memberAddress.id}','${openid}')">删除</li>

					</ul>

				</div>
			
			</li>
			</c:forEach>
		</ul>
		<a href="<%=contextPath %>/usercenter/editaddress?moduleType=1" class="addAddress">
            添加收货地址  <i class="addIcon">+</i>
        </a>
</div>
		<script src="<%=contextPath %>/resources/bower_components/zepto/zepto.min.js"></script>
		<script src="<%=contextPath %>/resources/js/lib/layer.m.js"></script>
		<script src="<%=contextPath %>/resources/js/server.domian.js"></script>
		<script src="<%=contextPath %>/resources/js/address.js"></script>
</body>

</html>